package com.lin.demo.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.lin.demo.annotations.EnumField;
import com.lin.demo.enums.SexEnum;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @Author zimingl
 * @Date 2022/9/25 17:59
 * @Description: TODO
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class User {

    @TableId(value = "id")
    private Long id;

    private String name;

    private Integer age;

    private String email;

    @EnumField(value = "sex", type = EnumField.Type.ENUM)
    private SexEnum sex;

    @TableField(value = "is_delete")
    private Integer isDelete;

    public User(Long id, String name, Integer age, String email) {
        this.id = id;
        this.name = name;
        this.age = age;
        this.email = email;
    }
}
